<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="icon" href="public/Images/favicon32.ico" type="image/x-icon" />
        <title>蘑菇街-我的买手街</title>
        <link href="public/Css/site.css" rel="stylesheet" type="text/css" />
        <script src="public/Js/jquery-1.7.2.min.js"></script>
        <script src="public/Js/home_index.js"></script>

<style>
.user_action li{
	float: left;
    height: 30px;
    line-height: 30px;
}

</style>
    </head>
<!-- 写入SiteController.php ==> public $layout='front_main.php'; -->
<!--header begin-->
<div class="header">
    
    <div class="m_header">
        <a class="index_a" href="index.php?r=site/index">Yii2.0 Shop首页</a>
        <ul class="header_list">
            
                <li class="head_info">
                    <i class="down"></i>
                    <a class="usrname" href="javascript:;">
                        
                        <i class="usegrade" style="background:url(public/Images/user.png) no-repeat -{$nums}px 10px;"></i>
                    </a>
                    <ul class="top_down">
                        <li><a href="{:U('User/index')}">个人设置</a></li>
                        <li><a href="{:U('User/bind')}">帐号绑定</a></li>
                        <li><a href="index.php?r=site/logout">退出</a></li>
                    </ul>
                </li>
                <li class="head_info"><a class="head_service" href="javascript:;">消息</a></li>
                <li class="head_info">
                    <a class="head_service" href="javascript:;">我的收藏</a>
                    <i class="down"></i>
                    <ul class="top_down">
                        <li><a href="{:U('Active/favs')}">喜欢的商品</a></li>
                        <li><a href="{:U('Active/shopfavs')}">收藏的小店</a></li>
                        <li><a href="{:U('Active/browserlog')}">浏览足迹</a></li>
                    </ul>
                </li>
            
                <li class="head_info">
<?php
                
    if (Yii::$app->user->isGuest) {
    	
        $menuItems[] = ['label' => '注册','class'=>'head_info', 'url' => ['/site/signup']];
        
        $menuItems[] = ['label' => '登录','class'=>'head_info', 'url' => ['/site/login']];
        
    } else {
    	
        $menuItems[] = [
            'label' => '退出 (' . Yii::$app->user->identity->username . ')',
            'url' => ['/site/logout'],
            'linkOptions' => ['data-method' => 'post']
        ];
        
    }
    echo Nav::widget([
        'options' => ['class' => 'head_info'],
        'items' => $menuItems,
    ]);
    
?>
    		
            
            </li>
            <li class="head_info"><a class="header_a" href="{:U('Order/index')}"><img id="detail" src="public/Images/detail.png" />我的订单</a></li>
            <li class="head_info"><a class="header_a" href="__MODULE__/Car/carList"><img id="cart" src="public/Images/cart.png" />购物车</a></li>
            <li class="head_info">
                <a class="head_service" href="">客户服务</a>
                <i class="down"></i>
                <ul class="top_down">
                    <li><a href="#">联系合作</a></li>
                    <li><a href="#">帮助</a></li>
                </ul>
            </li>
            <li class="head_info"><a class="header_a" href="__MODULE__/Main/index" target="_blank"><img id="xd" src="public/Images/xiaodian.png" />我的小店</a></li>
        </ul>
    </div>
</div>
<!--header end-->

<?= $content ?>

